home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 37
/
Amiga Format CD37 (1999-02-16)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-03].iso
/
-readerstuff-
/
chris_seward
/
aio19
/
data
/
ur2
< prev
next >
Wrap
Text File
|
1999-01-05
|
3KB
|
60 lines
{center}
{subhead} RoyalBridge.library{def}{p}
Review by Renne Nissinen
{left}
{p} {p}
This is just excellent. For the end user it's a library that many ARexx
scripts will require in the future (possibly :). And the reason is, that for
the ARexx programmer it's the library that lets them do anything they want!
All the things that are possible with regular compiled programming languages
will now be possible in ARexx. At least if speed is not an issue... :)
{p} {p}
Installation is quite simple; just copy the library to LIBS: and some data
files somewhere to your HD, and make one assign. After that the non-programmer
person just sits back and enjoys the enhanced abilities of new ARexx scripts
(although I haven't seen many yet).
{p} {p}
* Warning * - now it gets technical :)
{p} {p}
It is quite simple to use in your own programs, assuming that you know what
to do with the library functions that you suddenly can use :) First you just
open the library in the same way as you open rexxsupport.library for instance.
Then you can call any library function or peek & poke memory. You can open
libraries, call their functions and then close them, or just supply the
library name (prepended with "$") instead of the base address and not worry
about opening or closing the libraries.
{p} {p}
"But how can I call the library functions?" Well, that's actually a bit
tricky, but at least it's possible :) In the simplest form it's something
like "rbCall('$dos.library $Write',some,arguments,for,write)" for example. The
rbCall() function will open dos.library, look up the library vector offset for
Write() and its parameter data, and pass the supplied parameters to Write().
After it's done, it will close the library automatically and return.
{p} {p}
RoyalBridge can look up the needed values for functions on the fly, or if
you need more speed you can preload the .rb files (fd style) in the beginning.
Or if you need even more speed (and use a library more than once), you can
open the library yourself and supply the base address instead of its name, and
look up the LVO and parameter data (SAS/C pragmas style) yourself. Of course
you should also convert ARexx strings to c-strings outside time-critical
loops and such, especially if they're needed more than once. But of course it
still won't be staggeringly fast... There's also a preprocessor that will
ease these things for you, if you have the needed files from a C compiler.
{p} {p}
If you follow so far, you'll understand that you really can call any
library functions from ARexx scripts (exception; the a5 register can't be
used as a parameter - yet :), and you will find much more comprehensive info
in the archive itself. So if there's something that was previously impossible
to do in ARexx, you won't have to write your own rexx function library or
write the whole darn thing in C :)
{p} {p}
If you skipped here from the start of the tech talk, I'll just advise you to
install it if you ever download and use ARexx scripts anywhere (if you don't,
maybe you should because they make life easier :)
{p} {p}
Available from: Aminet:util/rexx/royalbridge11.lha
{p} {p}
Overall: 93% ** AIO Gold **